<%= render  :partial => "apo/navigation" %>

    <div id="content-pri-frame">

      <div id="content-pri-frame-gener">

	<div class="container memberContainer">

		<div class="cellRow cellRowHeader">

			<div class="cellBlock cellBlockNoBorder">
				Name
			</div>
			<div class="cellBlock cellBlockNoBorder">
				Eligible
			</div>

		</div>

    <% total = 0 %>
		<% @members.each_with_index do |member, x| %>

			<% #eligible = member.stored_percent_done >= 75 ? "Yes" : "No" %>
			<% eligible = Member.get_quorum(member) %>
			<% if eligible == "Yes" then total += 1 end %>
      <!-- if member.stored_percent_done >= 75
           eligible = "Yes"
           total += 1
         else
           eligible = "No"
         end
      -->
			<div class="cellRow" style="background-color: <%="#{eligible}" == "Yes"?"#22FF22":"red"%>">

				<div class="cellBlock cellBlockNoBorder" style="text-align: left;">
					<%= link_to h(member.last_first) , :action => "show" , :id => member %>
				</div>
				<div class="cellBlock cellBlockNoBorder">
					<%= eligible %>
				</div>

			</div>

		<% end %>

		<div class="cellRow cellRowHeader">

			<div class="cellBlock cellBlockNoBorderL">
				Quorum count:
			</div>
			<div class="cellBlock cellBlockNoBorderL" style="text-align: center">
				<%= total %>/<%= @members.size %>
			</div>

		</div>

	</div>

</div>

</div>
<%= render :partial => "apo/footer" %>